package com.zxjbyte.yiyi.module.system.domain.param.dict;

import com.zxjbyte.yiyi.framework.common.annotation.AllowedValues;
import com.zxjbyte.yiyi.framework.common.constant.StatusConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Author zhangxingjia
 * @Date 2024/1/24 17:44
 * @Version: 1.0
 */
@Data
@Schema(description = "字典数据新增请求结构体")
public class DictItemAddParam {

    // 字典类型
    @Schema(description = "字典id")
    private Long dictId;

    // 排序
    @Schema(description = "排序")
    private Integer sort;

    // 字典标签
    @Schema(description = "字典项标签")
    @NotBlank(message = "字典项标签不可为空")
    private String itemLabel;

    // 字段值
    @Schema(description = "字段项值")
    @NotBlank(message = "字段项值不可为空")
    private String itemValue;

    // css类名
    @Schema(description = "css类名")
    private String cssClass;

    // 样式JSON
    @Schema(description = "样式JSON")
    private String styleJson;


    @Schema(description = "状态：0-启用，1-禁用")
    @NotNull(message = "字典状态不可为空")
    @AllowedValues(intValues = {StatusConstant.ENABLE, StatusConstant.DISABLE})
    private Integer status;

    // 备注
    @Schema(description = "备注")
    private String remark;
}
